home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / perl5 / DirHandle.z / DirHandle
Encoding:
Text File  |  1998-10-30  |  1.2 KB  |  67 lines

  1.  
  2.  
  3.  
  4. DDDDiiiirrrrHHHHaaaannnnddddlllleeee((((3333))))                                                      DDDDiiiirrrrHHHHaaaannnnddddlllleeee((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      DirHandle - supply object methods for directory handles
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.          use DirHandle;
  13.          $d = new DirHandle ".";
  14.          if (defined $d) {
  15.              while (defined($_ = $d->read)) { something($_); }
  16.              $d->rewind;
  17.              while (defined($_ = $d->read)) { something_else($_); }
  18.              undef $d;
  19.          }
  20.  
  21.  
  22. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  23.      The DirHandle method provide an alternative interface to the _o_p_e_n_d_i_r(),
  24.      _c_l_o_s_e_d_i_r(), _r_e_a_d_d_i_r(), and _r_e_w_i_n_d_d_i_r() functions.
  25.  
  26.      The only objective benefit to using DirHandle is that it avoids namespace
  27.      pollution by creating globs to hold directory handles.
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.